package com.jkc.xh.adapters.viewholder;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.jkc.xh.R;
import com.jkc.xh.models.MessageModel;
import com.jkc.xh.utils.Tool;

import org.androidannotations.annotations.EViewGroup;
import org.androidannotations.annotations.ViewById;

/**
 * Created by wangjie28 on 2015/11/13.
 */
@EViewGroup(R.layout.item_grow_up)
public class GrowUpItemView extends RelativeLayout {


    @ViewById
    TextView title;
    @ViewById
    TextView content;
    @ViewById(R.id.create_time)
    TextView create_time;

    public GrowUpItemView(Context context) {
        super(context);
    }

    public GrowUpItemView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }


    public void bind(MessageModel model) {
        title.setText(model.title);
        content.setText(model.content);
        create_time.setText(Tool.formatSecondSimpleFullDate(model.create_time));
    }


}
